package com.lxq.live.dao;

import com.lxq.live.pojo.VideoRow;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface VideoRowRepository extends JpaRepository<VideoRow, String> {

    VideoRow findByUuid(String uuid);

    @Query(value = "select barrage from video_row where uuid=?1", nativeQuery = true)
    String getVideoBarrage(String uuid);

    List<VideoRow> findByAuthorId(String authorId);
}
